#ifndef _PROXY_INVOKE_H_
#define _PROXY_INVOKE_H_

#include <sys/types.h> //size_t
#include <inttypes.h>  //uint64_t

#include "uthash.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct tag_thread_context {
	int  thread_id;         /* use thread id as key */
	int  conn_fd;
	UT_hash_handle hh;         /* makes this structure hashable */
} thread_context;

/**
 * [invoke_proxy description]
 * @param  proxy_sock_path [description]
 * @param  group           [description]
 * @param  service         [description]
 * @param  version         [description]
 * @param  req_body        [description]
 * @param  req_len         [description]
 * @param  res_buf         [description]
 * @param  res_buf_len     [description]
 * @return                 [description]
 */
int invoke_proxy(const char * proxy_sock_path,
                 const char * group, const char * service, const char * version, const void * req_body, size_t req_len,
                 void ** res_buf, size_t * res_buf_len);


#ifdef __cplusplus
}
#endif

#endif